<%@ page import="java.util.List" %>
<%@ page import="com.User" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style type="text/css">
        tr{height: 50px;}
        th,td{width: 100px; text-align: center;}
    </style>
</head>
<body>

    <%
        List<User> list = new ArrayList<User>();
        list.add(new User(1001,"张三1","123","123@qq.com"));
        list.add(new User(1002,"张三2","123","123@qq.com"));
        list.add(new User(1003,"张三3","123","123@qq.com"));
        list.add(new User(1004,"张三4","123","123@qq.com"));
        list.add(new User(1005,"张三5","123","123@qq.com"));
    %>
    <table border="1" cellspacing="0" cellpadding="0">
        <tr>
            <th colspan="4">用户列表</th>
        </tr>
        <tr>
            <th>用户编号</th>
            <th>用户名</th>
            <th>密码</th>
            <th>邮箱</th>
        </tr>
        <%
            for (User user : list) {
         %>
            <tr>
                <td><%=user.getId()%></td>
                <td><%=user.getUsername()%></td>
                <td><%=user.getPassword()%></td>
                <td><%=user.getEmail()%></td>
            </tr>
        <%
            }
        %>
    </table>

</body>
</html>
